package cn.edu.sgu.www.mhxysy.feign.clients.pms;

import cn.edu.sgu.www.mhxysy.dto.system.*;
import cn.edu.sgu.www.mhxysy.easyui.component.impl.Tree;
import cn.edu.sgu.www.mhxysy.entity.system.*;
import cn.edu.sgu.www.mhxysy.restful.JsonResult;
import cn.edu.sgu.www.mhxysy.vo.system.MenuVO;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Component
public class PmsFeignFallback implements PmsFeignService {

    @Override
    public JsonResult<Void> enable(Integer id) {
        return JsonResult.error(OPERATION_ERROR_MESSAGE);
    }

    @Override
    public JsonResult<Void> insertEmail(EmailDTO emailDTO) {
        return JsonResult.error(OPERATION_ERROR_MESSAGE);
    }

    @Override
    public JsonResult<Void> deleteEmailById(Integer id) {
        return JsonResult.error(OPERATION_ERROR_MESSAGE);
    }

    @Override
    public JsonResult<Void> updateEmailById(EmailDTO emailDTO) {
        return JsonResult.error(OPERATION_ERROR_MESSAGE);
    }

    @Override
    public JsonResult<List<Email>> selectEmailsByUserId(String userId) {
        return JsonResult.error(QUERY_ERROR_MESSAGE, null);
    }

    @Override
    public JsonResult<Void> resources(PermissionInitDTO permissionInitDTO) {
        return JsonResult.error(OPERATION_ERROR_MESSAGE);
    }

    @Override
    public JsonResult<List<Permission>> selectPermissions(String service) {
        return JsonResult.error(QUERY_ERROR_MESSAGE, null);
    }

    @Override
    public JsonResult<List<String>> selectAnonymityPermissions(String service) {
        return JsonResult.error(QUERY_ERROR_MESSAGE, null);
    }

    @Override
    public JsonResult<List<String>> selectUserPermissions(String username, String service) {
        return JsonResult.error(QUERY_ERROR_MESSAGE, null);
    }

    @Override
    public JsonResult<Void> lockUser(String userId) {
        return JsonResult.error(OPERATION_ERROR_MESSAGE);
    }

    @Override
    public JsonResult<Void> updatePass(UserPassUpdateDTO userPassUpdateDTO) {
        return JsonResult.error(OPERATION_ERROR_MESSAGE);
    }

    @Override
    public JsonResult<Void> updateByUsername(User user, String service) {
        return JsonResult.error(OPERATION_ERROR_MESSAGE);
    }

    @Override
    public JsonResult<Void> updateLastLoginTime(String userId, LocalDateTime lastLoginTime) {
        return JsonResult.error(OPERATION_ERROR_MESSAGE);
    }

    @Override
    public JsonResult<User> selectByUsername(String username, String service) {
        return JsonResult.error(QUERY_ERROR_MESSAGE, null);
    }

    @Override
    public JsonResult<Void> control(MenuTreeDTO menuTreeDTO) {
        return JsonResult.error(OPERATION_ERROR_MESSAGE);
    }

    @Override
    public JsonResult<Void> updateSort(UserMenuDTO userMenuDTO) {
        return JsonResult.error(OPERATION_ERROR_MESSAGE);
    }

    @Override
    public JsonResult<List<MenuVO>> getLeftMenu(String userId) {
        return JsonResult.error(QUERY_ERROR_MESSAGE, null);
    }

    @Override
    @SuppressWarnings("all")
    public JsonResult<List<Tree>> getMenuTree(String userId) {
        return JsonResult.error(QUERY_ERROR_MESSAGE, null);
    }

    @Override
    public JsonResult<Set<String>> selectUserRoles(String username, String service) {
        return JsonResult.error(QUERY_ERROR_MESSAGE, null);
    }

    @Override
    public JsonResult<List<String>> getTableNames(String databaseName) {
        return JsonResult.error(QUERY_ERROR_MESSAGE, null);
    }

    @Override
    public JsonResult<List<Table>> selectByDatabase(String databaseName) {
        return JsonResult.error(QUERY_ERROR_MESSAGE, null);
    }

    @Override
    public JsonResult<List<TableField>> selectFields(String tableName) {
        return JsonResult.error(QUERY_ERROR_MESSAGE, null);
    }

}